fix: disable unsupported ssh shell-integration features - #475
Merged
Conversation
ghostty implements `ssh-env` and `ssh-terminfo` by replacing `ssh` with a wrapper that calls a `ghostty` CLI absent from agterm's bundle. Enabling either option made every `ssh` invocation fail. read the resolved feature mask after recursive config loading, force the two unsupported bits off, and restate every known flag so the other choices survive ghostty's reset-from-defaults assignment semantics. Hosted tests pin the bit mapping and total feature count against the bundled libghostty. Fix #463
`.revmux/profile.md` calibrates every revmux review of this repo: what agterm is, what a real failure looks like here, the blast radius, and which conventions are deliberate rather than defects. Without it each review runs on generic calibration and flags the short-comment policy and the visibility rule as problems. `.revmux/` was ignored wholesale for the task and run archive, and a re-include under an excluded directory is unreachable, so the pattern becomes `.revmux/*` with the profile as the one exception. The archive stays ignored.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #463.
ghostty's shell integration implements the
ssh-envandssh-terminfofeatures by replacing the user'ssshwith a wrapper that calls"$GHOSTTY_BIN_DIR/ghostty" +ssh. agterm's bundle has noghosttyCLI, so from 0.24.0 everysshinside agterm died instantly once either flag was on:Both flags default off, so only someone who deliberately turned them on is affected. The report is exact, including the footgun in its own workaround.
Where it came from. Upstream
283dca13replaced the self-contained ssh block with an unguarded delegate on 2026-05-05, five days after our previous pin.94c1407cmovedGHOSTTY_REVonto it on Aug 16 and 0.24.0 shipped the next day. Upstreammainstill carries the unguarded call, so moving the pin forward does not help.The fix is the third option the reporter proposed: apply the flags after the user's config so the wrapper is never defined. agterm loads a final
shell-integration-featuresline with both values off, built from libghostty's own resolved value read back throughghostty_config_getafterghostty_config_load_recursive_files. ghostty therefore stays the only thing parsing config text, and a flag set behind aconfig-fileinclude cannot land after the override.The line names all six flags rather than just the two. ghostty re-parses this key from its defaults on every occurrence, so a bare
no-ssh-envwould reset everything else the user set - which is exactly what the reporter hit writing his workaround.ShellIntegrationFeatureBitsTestspins the flag-to-bit mapping against the bundled libghostty: the default mask, each flag against its own bit in both directions, and= truecovering exactly the six flags we know about. The last one is what catches a flag appended upstream, which the others would survive silently.Verified on a running instance, not only by unit test. An isolated build whose scoped config was just
config-file = child.conf, with the child settingshell-integration-features = no-path,ssh-terminfo, producedGHOSTTY_SHELL_FEATURES=cursor:blink,titleandssh is /usr/bin/ssh- the ssh flag stripped through the include, the user'sno-pathpreserved, and no wrapper function defined.Four surfaces now name the exception: the starter
ghostty.conf,docs/troubleshooting.md,site/docs.html, and the bundled agent skill, which is the source for the Claude and Codex copies Help ▸ Install writes. Without that last one an installed agent asked to enablessh-terminfowould write it, reload, see a diagnostic count of 0 and report success on a setting that does nothing.The second commit is unrelated to the issue: it tracks
.revmux/profile.md, the review calibration for this repo, and narrows the.revmux/ignore so the run archive stays out.Not covered: terminfo forwarding is gone rather than restored. Getting it back means either shipping a
ghosttyCLI or carrying a patch against upstream's shell integration, and neither is worth it for a feature that was never advertised.docs/troubleshooting.mdgives the manualinfocmp -x xterm-ghostty | ssh <host> 'tic -x -'instead.